gtk4.git
14 years agocss: Move property parsing into styleproperty file
Benjamin Otte [Wed, 25 May 2011 23:25:00 +0000 (01:25 +0200)]
css: Move property parsing into styleproperty file

Just shuffles code around for parsing properties.

14 years agocss: Rename function to _gtk_style_property_parse_value()
Benjamin Otte [Wed, 25 May 2011 23:01:44 +0000 (01:01 +0200)]
css: Rename function to _gtk_style_property_parse_value()

... and take an optional style property as argument. This way, we can
allow custom parse functions for properties. The style property needs to
be optional so that we can use it for widget style properties, too.

14 years agocss: Rename struct variable
Benjamin Otte [Wed, 25 May 2011 22:09:26 +0000 (00:09 +0200)]
css: Rename struct variable

I want to add parse_func as something different soon.

14 years agostyleproperty: Change _css_value_to_string()
Benjamin Otte [Mon, 23 May 2011 05:16:17 +0000 (07:16 +0200)]
styleproperty: Change _css_value_to_string()

Name it _gtk_style_property_print_value() and actually pass it the style
property. This way, we can later change it to use custom print functions
for different style properties.

14 years agocss: Change to_string() to print()
Benjamin Otte [Mon, 23 May 2011 05:02:36 +0000 (07:02 +0200)]
css: Change to_string() to print()

It's preferrable to print to an existing GString instead of returning a
char* everywhere that needs to be freed later.

14 years agoreftests: Test new pseudo-class support in GtkBox
Benjamin Otte [Wed, 25 May 2011 21:52:48 +0000 (23:52 +0200)]
reftests: Test new pseudo-class support in GtkBox

14 years agoAPI: Change semantics of gtk_container_get_child_path()
Benjamin Otte [Wed, 25 May 2011 20:21:15 +0000 (22:21 +0200)]
API: Change semantics of gtk_container_get_child_path()

Include the child widget path in the returned path now. This allows
customizing the path of the current widgets - like adding flags to child
widgets (and maybe siblings in the future).

14 years agoAPI: Add gtk_widget_path_append_for_widget()
Benjamin Otte [Wed, 25 May 2011 18:42:27 +0000 (20:42 +0200)]
API: Add gtk_widget_path_append_for_widget()

Includes a bunch of header shuffling so we can use GtkWidget* in
gtkwidgetpath.h

14 years agoSilence a theme parser error
Matthias Clasen [Wed, 1 Jun 2011 22:40:11 +0000 (18:40 -0400)]
Silence a theme parser error

14 years agonotebook: Implement height_for_width and width_for_height getters
Benjamin Otte [Wed, 1 Jun 2011 21:37:21 +0000 (23:37 +0200)]
notebook: Implement height_for_width and width_for_height getters

14 years agonotebook: Rewrite size request function for wfh
Benjamin Otte [Wed, 1 Jun 2011 21:31:04 +0000 (23:31 +0200)]
notebook: Rewrite size request function for wfh

14 years agonotebook: Split out tabs size computation into its own function
Benjamin Otte [Wed, 1 Jun 2011 21:20:58 +0000 (23:20 +0200)]
notebook: Split out tabs size computation into its own function

14 years agonotebook: Compute tab width in a simpler way
Benjamin Otte [Wed, 1 Jun 2011 19:56:13 +0000 (21:56 +0200)]
notebook: Compute tab width in a simpler way

This code should be more obvious: The check only needs to check for
scrollable widgets, and only needs to compare to tab_width.

As a side note, for vis_pages == 1, tab_width will be smaller than
tab_max + stuff, so this code will not behave differently.

14 years agonotebook: Remove uneeded function declaration
Benjamin Otte [Wed, 1 Jun 2011 19:45:21 +0000 (21:45 +0200)]
notebook: Remove uneeded function declaration

14 years agonotebook: Include arrow size in tab size computation
Benjamin Otte [Wed, 1 Jun 2011 15:45:14 +0000 (17:45 +0200)]
notebook: Include arrow size in tab size computation

We don't want tabs to resize when a 2nd page is added, just because the
scroll arrows are now visible. And we do want the arrow size to be
included.

Note: Previosuly this code was never run, as the check
  requisition->width < tab_width
was only run when tab_width wasn't computed, so was still equal to 0
(same for the height). So what this patch essentially does it add the
functionality of the if switch.

14 years agotests: Make variable const to silence gcc
Benjamin Otte [Wed, 1 Jun 2011 14:52:34 +0000 (16:52 +0200)]
tests: Make variable const to silence gcc

14 years agoconfigure.ac: Use AS_HELP_STRING instead deprecated AC_HELP_STRING
Javier Jardón [Mon, 16 May 2011 11:28:56 +0000 (12:28 +0100)]
configure.ac: Use AS_HELP_STRING instead deprecated AC_HELP_STRING

14 years agoGtkLabel: Make selection behave more similar to GtkEntry
Matthias Clasen [Wed, 1 Jun 2011 05:08:13 +0000 (01:08 -0400)]
GtkLabel: Make selection behave more similar to GtkEntry

For shift-clicks inside the selection, shrink the selection.
https://bugzilla.gnome.org/show_bug.cgi?id=353712

14 years agoTrivial NULL vs 0 confusion
Matthias Clasen [Wed, 1 Jun 2011 04:05:06 +0000 (00:05 -0400)]
Trivial NULL vs 0 confusion

14 years agoFix an example
Matthias Clasen [Wed, 1 Jun 2011 03:50:13 +0000 (23:50 -0400)]
Fix an example

14 years agoChange GtkTreePath to grow exponentially
Matthias Clasen [Wed, 1 Jun 2011 02:10:58 +0000 (22:10 -0400)]
Change GtkTreePath to grow exponentially

To avoid quadratic behaviour when building up
paths by repeated appending indices. Bug 634491.

14 years agoAdd tests for GtkTreePath
Matthias Clasen [Wed, 1 Jun 2011 02:10:40 +0000 (22:10 -0400)]
Add tests for GtkTreePath

14 years agoGtkSearchEngineTracker: avoid an unused variable warning
Matthias Clasen [Wed, 1 Jun 2011 01:26:40 +0000 (21:26 -0400)]
GtkSearchEngineTracker: avoid an unused variable warning

14 years agoMake tracker search engine less verbose
Matthias Clasen [Wed, 1 Jun 2011 00:50:42 +0000 (20:50 -0400)]
Make tracker search engine less verbose

Patch by Vincent Untz,
https://bugzilla.gnome.org/show_bug.cgi?id=642768

14 years agoAdd annotations to gtk_css_provider_load_from_data
Matthias Clasen [Wed, 1 Jun 2011 00:37:43 +0000 (20:37 -0400)]
Add annotations to gtk_css_provider_load_from_data

https://bugzilla.gnome.org/show_bug.cgi?id=646859

14 years agoGtkIconTheme: a small optimization
Matthias Clasen [Wed, 1 Jun 2011 00:29:53 +0000 (20:29 -0400)]
GtkIconTheme: a small optimization

John Lindgren points out in bug 650202 that using judicious
use of g_key_file_has_key() can save some cycles in application
startup.

14 years agoGtkEntry: don't forget to disconnect idles
Matthias Clasen [Wed, 1 Jun 2011 00:11:28 +0000 (20:11 -0400)]
GtkEntry: don't forget to disconnect idles

As pointed out by John Lindgren in bug 650114, GtkEntry forgets
to disconnect an idle source when the completion is set to NULL.

14 years agogtkeditable.c: Remove unused variable in example code
Alexander Saprykin [Sat, 14 May 2011 09:34:01 +0000 (13:34 +0400)]
gtkeditable.c: Remove unused variable in example code

https://bugzilla.gnome.org/show_bug.cgi?id=650167

14 years agoGtkEntryCompletion: add a sanity check
Matthias Clasen [Wed, 1 Jun 2011 00:07:14 +0000 (20:07 -0400)]
GtkEntryCompletion: add a sanity check

Patch by John Lindgren,
https://bugzilla.gnome.org/show_bug.cgi?id=650110

14 years agogtk/gtkcolorsel: gtk_misc_set_alignment replacing
Diego Celix [Sat, 21 May 2011 17:37:26 +0000 (19:37 +0200)]
gtk/gtkcolorsel: gtk_misc_set_alignment replacing

Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkcolorsel.c

https://bugzilla.gnome.org/show_bug.cgi?id=650762

14 years agogtk/gtknotebook: gtk_misc_set_alignment replacing
Diego Celix [Fri, 20 May 2011 01:48:22 +0000 (02:48 +0100)]
gtk/gtknotebook: gtk_misc_set_alignment replacing

Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtknotebook.c

https://bugzilla.gnome.org/show_bug.cgi?id=650762

14 years agogtkcustompaperunixdialog: gtk_misc_set_alignment
Diego Celix [Sat, 21 May 2011 17:30:33 +0000 (19:30 +0200)]
gtkcustompaperunixdialog: gtk_misc_set_alignment

Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkcustompaperunixdialog.c

https://bugzilla.gnome.org/show_bug.cgi?id=650762

14 years agogtk/gtkfilechooserbutton: gtk_misc_set_alignment
Diego Celix [Sat, 21 May 2011 17:09:58 +0000 (19:09 +0200)]
gtk/gtkfilechooserbutton: gtk_misc_set_alignment

Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkfilechooserbutton.c

https://bugzilla.gnome.org/show_bug.cgi?id=650762

14 years agoGtkAppChooser: improve docs
Matthias Clasen [Wed, 1 Jun 2011 00:00:50 +0000 (20:00 -0400)]
GtkAppChooser: improve docs

Add a cross-reference to GContentType.
https://bugzilla.gnome.org/show_bug.cgi?id=650012

14 years agoMake cross-references to gio docs work
Matthias Clasen [Wed, 1 Jun 2011 00:00:11 +0000 (20:00 -0400)]
Make cross-references to gio docs work

14 years agoGtkApplication: Add window-added/-removed signals
Matthias Clasen [Tue, 31 May 2011 23:12:13 +0000 (19:12 -0400)]
GtkApplication: Add window-added/-removed signals

This is useful to let unrelated parts of an application (or
plugins) learn about the windows of an application. Based
on a patch by Matt Barnes,
https://bugzilla.gnome.org/show_bug.cgi?id=641087

14 years agoSort GtkApplication windows by most-recently-focused
Matthias Clasen [Tue, 31 May 2011 22:28:55 +0000 (18:28 -0400)]
Sort GtkApplication windows by most-recently-focused

Based on a patch by Matt Barnes,
https://bugzilla.gnome.org/show_bug.cgi?id=624539

14 years agogtk-demo: don't use a non-existent icon name
Cosimo Cecchi [Tue, 31 May 2011 20:13:50 +0000 (16:13 -0400)]
gtk-demo: don't use a non-existent icon name

14 years agoall: avoid boxed structs copying where possible (and 2)
Javier Jardón [Tue, 31 May 2011 15:10:46 +0000 (17:10 +0200)]
all: avoid boxed structs copying where possible (and 2)

Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.

14 years agotests: avoid boxed structs copying where possible
Javier Jardón [Sun, 29 May 2011 14:45:40 +0000 (16:45 +0200)]
tests: avoid boxed structs copying where possible

Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.

14 years agogtkcssprovider: Free shorthand border GValues in the right place
Carlos Garnacho [Mon, 30 May 2011 17:29:22 +0000 (19:29 +0200)]
gtkcssprovider: Free shorthand border GValues in the right place

The call to gtk_border_free() within unpack_border() felt completely
in the wrong place, as the border actually pertains to the GValue
being unpacked. Plus, the GValue itself was also being leaked.

14 years agogtkcssprovider: plug several leaks
Carlos Garnacho [Mon, 30 May 2011 17:26:28 +0000 (19:26 +0200)]
gtkcssprovider: plug several leaks

In finalize(), clear all rulesets.
In parse_declaration(), Free the GValue under unhandled error situations.
In gtk_css_provider_load_internal(), Do not leak the file contents.

14 years agogtkstyleproperty: Plug two leaks
Carlos Garnacho [Mon, 30 May 2011 17:21:42 +0000 (19:21 +0200)]
gtkstyleproperty: Plug two leaks

In rgba_value_parse(), unref the symbolic color once we've resolved it.
In gradient_value_parse(), take the GtkGradient so we leave no dangling
references.

14 years agogtkstyleproperties: zero GValue out before using G_VALUE_COLLECT_INIT()
Carlos Garnacho [Mon, 30 May 2011 17:18:41 +0000 (19:18 +0200)]
gtkstyleproperties: zero GValue out before using G_VALUE_COLLECT_INIT()

Fixes invalid reads in valgrind

14 years agogtkcssprovider: Use g_slice_dup() to copy GValues around
Carlos Garnacho [Mon, 30 May 2011 17:04:22 +0000 (19:04 +0200)]
gtkcssprovider: Use g_slice_dup() to copy GValues around

GValues stored in GtkCssRulesets are gslice managed, so don't
g_memdup() GValues from shorthand properties. This fixes
memory corruptions when reloading contents in a GtkCssProvider.

14 years ago[l10n]Updated Catalan (Valencian) translation
Carles Ferrando [Sun, 29 May 2011 12:10:00 +0000 (14:10 +0200)]
[l10n]Updated Catalan (Valencian) translation

14 years ago[l10n]Updated Catalan (Valencian) translation
Carles Ferrando [Sun, 29 May 2011 12:09:36 +0000 (14:09 +0200)]
[l10n]Updated Catalan (Valencian) translation

14 years agoUpdated Esperanto translation
Kristjan SCHMIDT [Sat, 28 May 2011 12:32:09 +0000 (14:32 +0200)]
Updated Esperanto translation

14 years agoliststore: Replace macro with an inline function
Benjamin Otte [Fri, 27 May 2011 02:29:56 +0000 (04:29 +0200)]
liststore: Replace macro with an inline function

Also remove a duplicate check in gtk_list_store_iter_is_valid().

gcc was complaining about "comparison always true" when using the macro.

14 years agostyleproperties: Remove unused priv variables
Benjamin Otte [Fri, 27 May 2011 02:24:10 +0000 (04:24 +0200)]
styleproperties: Remove unused priv variables

14 years agotreeview: Remove unused variables
Benjamin Otte [Fri, 27 May 2011 02:23:29 +0000 (04:23 +0200)]
treeview: Remove unused variables

... and all the code doing complex computations to assign values to
them.

14 years agobutton: Remove unused variables
Benjamin Otte [Fri, 27 May 2011 02:23:10 +0000 (04:23 +0200)]
button: Remove unused variables

14 years agodocs: Remove unused variables in shooter example
Benjamin Otte [Fri, 27 May 2011 02:22:52 +0000 (04:22 +0200)]
docs: Remove unused variables in shooter example

14 years agogtk-demo: Don't store anchor in an unused variable
Benjamin Otte [Fri, 27 May 2011 02:22:24 +0000 (04:22 +0200)]
gtk-demo: Don't store anchor in an unused variable

14 years agogtk-demo: Remove unused variable for text tags
Benjamin Otte [Fri, 27 May 2011 02:21:57 +0000 (04:21 +0200)]
gtk-demo: Remove unused variable for text tags

14 years agotests: Remove unused variables
Benjamin Otte [Fri, 27 May 2011 02:21:40 +0000 (04:21 +0200)]
tests: Remove unused variables

14 years agotests: Make forcing of class registers work without gcc warnings
Benjamin Otte [Fri, 27 May 2011 02:20:45 +0000 (04:20 +0200)]
tests: Make forcing of class registers work without gcc warnings

14 years agocss: Constify path argument to _css_selector_matches()
Benjamin Otte [Wed, 25 May 2011 15:40:03 +0000 (17:40 +0200)]
css: Constify path argument to _css_selector_matches()

It should have been const all the time, but I assumed widgetpath code
wasn't properly const. PEBKAC.

14 years agowidgetpath: Make includes absolute
Benjamin Otte [Wed, 25 May 2011 18:22:14 +0000 (20:22 +0200)]
widgetpath: Make includes absolute

Just like everywhere else

14 years agomenuitem: Remove unused variable
Benjamin Otte [Wed, 25 May 2011 15:53:12 +0000 (17:53 +0200)]
menuitem: Remove unused variable

Seriously, can't people compile with -Werror? Broke with
5f2ef59d6968f311abe3ebf9f477120240c1acb2

14 years agostyleproperty: Fix memleak in unpacking code
Benjamin Otte [Thu, 26 May 2011 01:14:00 +0000 (03:14 +0200)]
styleproperty: Fix memleak in unpacking code

14 years agomenuitem: Fix copy/paste error
Benjamin Otte [Thu, 26 May 2011 14:45:25 +0000 (16:45 +0200)]
menuitem: Fix copy/paste error

Thanks to Kalev Lember for noticing this one.

14 years agoconfigure: Check for XGetEventData()
Carlos Garnacho [Fri, 20 May 2011 20:21:59 +0000 (22:21 +0200)]
configure: Check for XGetEventData()

This is a call only available in recent libX11, only the XI2 code
depends on this within GDK, but XI2 implies having GenericEvents
available too.

14 years agogdk: do not fallback to event->xany.window in GdkEventTranslator
Carlos Garnacho [Fri, 20 May 2011 20:17:03 +0000 (22:17 +0200)]
gdk: do not fallback to event->xany.window in GdkEventTranslator

This is already done in gdk_event_source_get_filter_window(), and
could lead to wrong event assignment if an event translator happens
to return a window for an event it doesn't handle.

14 years agoCut deadwood
Matthias Clasen [Thu, 26 May 2011 17:15:40 +0000 (13:15 -0400)]
Cut deadwood

The old tutorial examples haven't been built in years, and are
not useful to keep around in git unless somebody does the work
to integrate them into the 'Getting started' section of the
current docs.

14 years agoconfigure: Fix build of pixbuf-demo
Florian Müllner [Thu, 26 May 2011 12:57:21 +0000 (14:57 +0200)]
configure: Fix build of pixbuf-demo

14 years agoMove demos around
Matthias Clasen [Thu, 26 May 2011 04:32:31 +0000 (00:32 -0400)]
Move demos around

The pixbuf-demo gets its own subdirectory, the other small
tests move from demos/ to tests/.

14 years agoAnd actually delete it
Matthias Clasen [Thu, 26 May 2011 04:21:54 +0000 (00:21 -0400)]
And actually delete it

14 years agoRemove no-longer-needed pixbuf_init hack
Matthias Clasen [Thu, 26 May 2011 04:20:59 +0000 (00:20 -0400)]
Remove no-longer-needed pixbuf_init hack

Since gdk-pixbuf is now a separate project again, we no
longer need to locate it inside our source tree.

14 years agoRemove an incomplete, dead copy of testgtk
Matthias Clasen [Thu, 26 May 2011 04:08:43 +0000 (00:08 -0400)]
Remove an incomplete, dead copy of testgtk

14 years agoSimplify GtkLockButton
Matthias Clasen [Thu, 26 May 2011 00:19:08 +0000 (20:19 -0400)]
Simplify GtkLockButton

Now it is actually just a button, which makes things simpler
and is closer to what the designers want.

14 years agomenuitem: Position submenus properly
Benjamin Otte [Wed, 25 May 2011 02:49:12 +0000 (04:49 +0200)]
menuitem: Position submenus properly

Now that we can actually query the menu's size, don't query the
preferred minimum size and hope it's correct, but use its actual size.

14 years agomenu: Realize window before positioning
Benjamin Otte [Wed, 25 May 2011 02:48:20 +0000 (04:48 +0200)]
menu: Realize window before positioning

We want the menu realized so we know the size it's allocating to itself.
And we need that size to position the menu properly.
This is best visible on right-to-left.

14 years agopaned: More fixes to keep windows in sync with widgets
Benjamin Otte [Wed, 25 May 2011 02:24:26 +0000 (04:24 +0200)]
paned: More fixes to keep windows in sync with widgets

Fixes sidebar in evince not showing up. This was caused by the
visiblility of the widget changing and the paned not fixing its child
window's visibility accordingly.

14 years agobgo#642929 - Don't infinite-loop in GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
Kjell Ahlstedt [Mon, 23 May 2011 20:02:00 +0000 (15:02 -0500)]
bgo#642929 - Don't infinite-loop in GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER

If the user pressed Enter to confirm the file chooser while the filename entry
was empty, then gtk_file_chooser_default_should_respond() would go back and forth
between the cases for handling the filename entry and the file list.

14 years agotests: Add simple CSS test for widget style properties
Benjamin Otte [Mon, 23 May 2011 05:11:31 +0000 (07:11 +0200)]
tests: Add simple CSS test for widget style properties

14 years agocssprovider: Don't convert widget style properties to CSS
Benjamin Otte [Mon, 23 May 2011 05:10:56 +0000 (07:10 +0200)]
cssprovider: Don't convert widget style properties to CSS

They are still CSS, so converting them is wrong.

14 years agocssprovider: Use right hash table when printing
Benjamin Otte [Mon, 23 May 2011 05:01:14 +0000 (07:01 +0200)]
cssprovider: Use right hash table when printing

If the CSS provider had widget style properties, printing them would
crash since 82b340f6f005a7d2b70d9aa7febb8612a53d0eda

14 years agowindow: Only draw resize grip if its window exists
Benjamin Otte [Mon, 23 May 2011 13:46:59 +0000 (15:46 +0200)]
window: Only draw resize grip if its window exists

Don't rely on priv->resize_grip_visible as the code comment in the
variable declaration indicates.
This fixes warnings with GtkPlug, which can cause resize_grip_visible to
be TRUE but grid_window to be NULL - running tests/teststatusicon
reproduces this.

This broke with 7ef113ce56a75641175af31267e2075f634267e0

14 years agoRemove unused function attributes from symbol files
Matthias Clasen [Mon, 23 May 2011 03:39:48 +0000 (23:39 -0400)]
Remove unused function attributes from symbol files

14 years agoquartz: actually register gdk_quartz_display_dispose
Kristian Rietveld [Sun, 22 May 2011 10:29:37 +0000 (12:29 +0200)]
quartz: actually register gdk_quartz_display_dispose

14 years agoquartz: fix a typo
Kristian Rietveld [Sun, 22 May 2011 10:27:38 +0000 (12:27 +0200)]
quartz: fix a typo

14 years agocssparser: Fix typo where we used "uint" for a type
Benjamin Otte [Sun, 22 May 2011 04:07:18 +0000 (06:07 +0200)]
cssparser: Fix typo where we used "uint" for a type

Interestingly this works for gcc, but breaks on MSVC.

14 years agostyle: Make margin a shorthand
Benjamin Otte [Sun, 22 May 2011 03:55:12 +0000 (05:55 +0200)]
style: Make margin a shorthand

... and add the real properties:
- margin-top
- margin-left
- margin-bottom
- margin-right

14 years agostyle: Make padding a shorthand
Benjamin Otte [Sun, 22 May 2011 03:42:17 +0000 (05:42 +0200)]
style: Make padding a shorthand

... and add the real properties:
- padding-top
- padding-left
- padding-bottom
- padding-right

14 years agoreftests: sort EXTRA_DIST in Makefile
Benjamin Otte [Sun, 22 May 2011 02:48:02 +0000 (04:48 +0200)]
reftests: sort EXTRA_DIST in Makefile

14 years agoreftests: Add a reftest to check shorthands do work
Benjamin Otte [Sun, 22 May 2011 02:46:42 +0000 (04:46 +0200)]
reftests: Add a reftest to check shorthands do work

Checks shorthands are properly unpacked in the CSS and that they indeed
set all relevant properties. Or at least border-width does.

14 years agoreftests: Add label-shadows test
Benjamin Otte [Sun, 22 May 2011 02:27:38 +0000 (04:27 +0200)]
reftests: Add label-shadows test

Tests shadows work properly for rotated labels

14 years agoshadow: Redo shadow implementation for rotations
Benjamin Otte [Sun, 22 May 2011 02:24:23 +0000 (04:24 +0200)]
shadow: Redo shadow implementation for rotations

The shadows went bonkers when the labels were rotated

14 years agothemingeninge: Handle translations properly
Benjamin Otte [Sun, 22 May 2011 01:53:21 +0000 (03:53 +0200)]
themingeninge: Handle translations properly

We want to keep the location of where to render, but transform th
context by the pango transform.

14 years agolabel: Account for y-translation when rotating
Benjamin Otte [Sun, 22 May 2011 01:53:02 +0000 (03:53 +0200)]
label: Account for y-translation when rotating

14 years agotests: Add parser test for shorthands
Benjamin Otte [Sun, 22 May 2011 01:09:23 +0000 (03:09 +0200)]
tests: Add parser test for shorthands

14 years agostyle: Convert border-width to a shorthand
Benjamin Otte [Sat, 21 May 2011 22:10:43 +0000 (00:10 +0200)]
style: Convert border-width to a shorthand

Add the corresponding properties it refers to, too:
- border-top-width
- border-left-width
- border-bottom-width
- border-right-width

14 years agostyle: Add support for shorthand properties
Benjamin Otte [Sat, 21 May 2011 21:47:19 +0000 (23:47 +0200)]
style: Add support for shorthand properties

Shorthand properties are basically the same a in CSS. For storage in
style properties or the CSS provider, they are unpacked into the real
values, so it is possible to partially override them.

No properties are yet converted to the new world yet, this is just the
code for supporting them.

14 years agostylepropertis: Use set_by_property() in set_valist()
Benjamin Otte [Sat, 21 May 2011 19:19:57 +0000 (21:19 +0200)]
stylepropertis: Use set_by_property() in set_valist()

... instead of duplicating code. This causes an extra g_value_copy().
If that turns out to be a performance issue, we can invent something
that handles this (like passing a gboolean take_value).

The reason for this duplication deletion is that we want to complicate
the setting code to handle shorthands by unpacking them and storing the
separate values.

14 years agostyleproperties: Add _gtk_style_properties_set_property_by_property()
Benjamin Otte [Sat, 21 May 2011 19:17:08 +0000 (21:17 +0200)]
styleproperties: Add _gtk_style_properties_set_property_by_property()

... as a replacement for _gtk_style_properties_set_property_by_pspec().
We'll need that to handle shorthands.

14 years agostyleproperties: Use peek_property() in get_valist()
Benjamin Otte [Sat, 21 May 2011 18:03:28 +0000 (20:03 +0200)]
styleproperties: Use peek_property() in get_valist()

14 years agostyleproperties: Validate values when setting them
Benjamin Otte [Sat, 21 May 2011 17:43:11 +0000 (19:43 +0200)]
styleproperties: Validate values when setting them

Note that validation is not necessary when resolving, because all values
are valid for those cases.

14 years agostyleproperties: Remove needless check
Benjamin Otte [Sat, 21 May 2011 17:39:46 +0000 (19:39 +0200)]
styleproperties: Remove needless check

14 years agostyleproperties: Use peek_property in get_property
Benjamin Otte [Sat, 21 May 2011 15:43:38 +0000 (17:43 +0200)]
styleproperties: Use peek_property in get_property

... instead of duplicating the code.